package com.aoxon.cargo.service;

import java.util.HashMap;

import com.aoxon.cargo.bean.GsonBean;

/**
 * 根据城市和市场获取对应商家列表的服务
 * 
 * @author ZZJ
 * 
 */
public class SearchSupplierFormCityMarkerService extends MyService {
	
	/**
	 * 根据城市和市场获取商家数据
	 * 可选择按热门还是验证排序
	 * @param startIndex
	 * @param length
	 * @param fromHot
	 * @param city
	 * @param market
	 * @return
	 */
	public GsonBean execute(int startIndex, int length,
			boolean fromHot, String city, String market) {

		if (fromHot) {
			url = "selectSupplierHot" + suffix;
		} else {
			url = "selectSupplierCre" + suffix;
		}

		params = new HashMap<String, String>();
		params.put("startIndex", String.valueOf(startIndex));
		params.put("length", String.valueOf(length));
		params.put("city", city);
		params.put("market", market);

		return doPost();

	}
}
